:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --accent-color: #e74c3c;
  --text-color: #34495e;
  --light-bg: #f9f9f9;
  --dark-bg: #2c3e50;
  --border-color: #ddd;
  --success: #27ae60;
  --warning: #f39c12;
  --danger: #e74c3c;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--light-bg);
  line-height: 1.6;
}

.container-fluid {
  padding: 0;
}

/* 导航栏样式 */
.sidebar {
  background-color: var(--dark-bg);
  color: white;
  min-height: 100vh;
  padding: 20px 0;
  position: sticky;
  top: 0;
}

.sidebar-nav {
  list-style-type: none;
  padding: 0;
}

.sidebar-nav li {
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav li a {
  color: white;
  text-decoration: none;
  display: block;
  transition: all 0.3s;
}

.sidebar-nav li a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.sidebar-nav hr {
  border-color: rgba(255, 255, 255, 0.1);
  margin: 10px 0;
}

/* 内容区域样式 */
.content-area {
  padding: 30px;
}

/* 卡片样式 */
.book-card {
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
  background-color: white;
  overflow: hidden;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.book-card-img {
  height: 200px;
  background-color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.book-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-body {
  padding: 15px;
}

.book-card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--dark-bg);
}

.book-card-author {
  color: #777;
  font-style: italic;
  margin-bottom: 10px;
}

.book-card-rating {
  color: var(--warning);
  margin-bottom: 10px;
}

.book-card-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.status-available {
  background-color: var(--success);
  color: white;
}

.status-borrowed {
  background-color: var(--warning);
  color: white;
}

.status-maintenance {
  background-color: var(--danger);
  color: white;
}

/* 按钮样式 */
.btn {
  border-radius: 4px;
  padding: 8px 16px;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-success {
  background-color: var(--secondary-color);
  color: white;
}

.btn-success:hover {
  background-color: #27ae60;
}

.btn-danger {
  background-color: var(--accent-color);
  color: white;
}

.btn-danger:hover {
  background-color: #c0392b;
}

/* 表单样式 */
form {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

/* 详情页样式 */
.detail-header {
  background-color: var(--dark-bg);
  color: white;
  padding: 30px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.detail-section {
  background-color: white;
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 评论区样式 */
.review-item {
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.review-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.review-author {
  font-weight: bold;
}

.review-date {
  color: #777;
  font-size: 0.9rem;
}

/* 评分星星 */
.rating {
  color: var(--warning);
  font-size: 1.2rem;
}

/* 分页样式 */
.pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.page-links {
  display: flex;
  align-items: center;
}

.page-links a {
  display: inline-block;
  padding: 5px 10px;
  margin: 0 5px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 4px;
  text-decoration: none;
}

.page-current {
  padding: 5px 10px;
  margin: 0 5px;
}

/* 首页统计卡片 */
.stats-card {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.stats-card-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.stats-card-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--dark-bg);
}

.stats-card-title {
  color: #777;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .sidebar {
    min-height: auto;
    position: relative;
  }
  
  .content-area {
    padding: 15px;
  }
}

/* 自定义类 */
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* 收藏和点赞按钮 */
.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #f5f5f5;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background-color: #eee;
}

.action-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
} 